﻿package
{
	import flash.display.MovieClip;
	import com.mediagallary.model.GallaryModel;
	import com.mediagallary.view.*;
	import com.mediagallary.controller.GallaryController;
	
	public class MediaGallary extends MovieClip
	{
		private var gallaryModel:GallaryModel;
		private var gallaryView:GallaryView;
		private var imageView:ImageView
		private var gallaryController:GallaryController;
		private var container:MovieClip;
		
		private static const DATA_PATH:String = "xml/mediagallary.xml";
		
		public function MediaGallary()
		{	
			container = new MovieClip();
			addChild(container);
			
			gallaryModel = new GallaryModel();
			gallaryController = new GallaryController(gallaryModel);
			gallaryView = new GallaryView(gallaryModel, gallaryController, container);
			addChild(gallaryView);
			imageView = new ImageView(gallaryModel, gallaryController, container);
			addChild(imageView);
			gallaryModel.loadData(DATA_PATH);
			
			
			/*slideModel = new SlideshowModel();
			slideController = new SlideshowController(slideModel);
			slideView = new SlideshowView(container_mc);
			slideView.setControllerReference(slideController);
			textView = new SlideshowTextView(title_txt, right_mc.numbers_txt, right_mc, info_background_mc);
			textController = new SlideshowTextController(slideModel);
			
			textController.setTextViewReference(textView);
			slideController.setViewReference(slideView);
			slideView.setButtonsReference(right_mc);
			
			slideView.model = slideModel;
			textView.model = slideModel;
			
			slideModel.load(new URLRequest(slideShowDataFile));
			
			slideController.addNextButton(right_mc.next_btn);
			slideController.addNextButton(container_mc);
			slideController.addPrevButton(right_mc.prev_btn);
			slideController.addPlayBtn(right_mc.play_btn);
			slideController.addPauseBtn(right_mc.pause_btn);
			textController.addMoreInfoBtn(right_mc.more_info_btn);
			right_mc.play_btn.visible = false;*/
			
		}
			
		
	}
}